import java.util.Random;

public class test1 {
    public static void main(String[] args) {
        //6位验证码，前三位数字，后三位大小写字母

        //字母放数组
        char[] chs=new char[52];
        for (int i = 0; i < chs.length; i++) {
            if(i<=25){
                //小写字母
                chs[i]=(char) (97+i);//a=97
            }else {
                //大写字母
                chs[i]=(char) (65+i-26);//A=65
            }
        }

        //接收最终结果
        String res="";

        Random r=new Random();
        //抽三个数字
        for (int i = 0; i < 3; i++) {
            int num=r.nextInt(10);
            res=res+num;
        }

        //抽三个字母
        for (int i = 0; i < 3; i++) {
            int index=r.nextInt(chs.length);
            res=res+chs[index];
        }

        System.out.println(res);
    }

}
